*******************
**** Table B15 ****
******************* 


use "$data/paymentdata_ready" , clear

keep if t==1

log using "$output/table b15", replace

reg ratiow1 treatmentalldummy2 treatmentalldummy3 treatmentalldummy4 treatmentalldummy5 treatmentalldummy6 treatmentalldummy7 teamdummy* firststickerdummy* , cluster(dayteam)

reg ratiow1 treatmentalldummy2 treatmentalldummy3 treatmentalldummy4 treatmentalldummy5 treatmentalldummy6 treatmentalldummy7 teamdummy* firststickerdummy* preratiow1 lastdebt_demeanedw1 prepaymentsmadedummyB* , cluster(dayteam)

capture program drop Ey_boot
program define Ey_boot, eclass
twopm ratiow1 treatmentalldummy2-treatmentalldummy7 ///
teamdummy* firststickerdummy* preratiow1 lastdebt_demeanedw1 prepaymentsmadedummyB* ///
, firstpart(probit) secondpart(regress) vce(cluster dayteam)
margins, dydx(treatmentalldummy2-treatmentalldummy7) nose post
end
bootstrap _b, seed(340) reps(1000): Ey_boot
estimates store R

test treatmentalldummy2 = treatmentalldummy4
test treatmentalldummy2 = treatmentalldummy5
test treatmentalldummy2 + treatmentalldummy3 = treatmentalldummy4 + treatmentalldummy5

test treatmentalldummy3 = treatmentalldummy6
test treatmentalldummy3 = treatmentalldummy7
test treatmentalldummy2 + treatmentalldummy3 = treatmentalldummy6 + treatmentalldummy7

test treatmentalldummy4 = treatmentalldummy6
test treatmentalldummy5 = treatmentalldummy7
test treatmentalldummy4 + treatmentalldummy5 = treatmentalldummy6 + treatmentalldummy7

test treatmentalldummy4 = treatmentalldummy5
test treatmentalldummy6 = treatmentalldummy7
test treatmentalldummy4 + treatmentalldummy6 = treatmentalldummy5 + treatmentalldummy7



log close
